<div id='div.auth.baseinfo'>
  <table width="400px" height="100px">
	<tr><td>编号 ：</td> <td><span id="nodeid" name="nodeid" /></td></tr>
	<tr><td>名称 ：</td> <td><span id="title" name="title"  /></td></tr>
	<tr><td>类型 ：</td> <td><span id="kind" name="kind"  /></td></tr>
	<tr><td>备注 ：</td> <td><span id="note" name="note" /></td></tr>
	<tbody id="kind_1" style="display:none">
		<tr><td >表名 ：</td><td ><span id="tablename" name = "tablename" /></td></tr>
		<tr><td >显示的字段 ：</td><td ><span id="vcol" name = "vcol" /></td></tr>
		<tr><td >分配权限的字段 ：</td><td ><span id="pcol" name = "pcol" /></td></tr>
		<tr><td >检索条件 ：</td><td ><span id="condition" name = "condition" /></td></tr>
	</tbody>
  </table>
</div>

<script type="text/javascript">
  window.addEvent('domready', function() {
  //nodeinfo 从auth.tree.html的onNodeClick事件传过来的
  	if(nodeinfo!=null){
  		var kind_cn = '未知权限类型';
  		nodeinfo.kind==0 ? kind_cn = '静态权限' : kind_cn = '动态权限'; 
		$('nodeid').set('html', nodeinfo.id);
		$('title').set('html', nodeinfo.title);
		$('kind').set('html', kind_cn);
		$('note').set('html', nodeinfo.note);
		if( nodeinfo.kind ==1 ){
			$('kind_1').set('style', 'display:block');
			try {
				var request = new Request.JSON({
					url: '/data/sc.action',
					onComplete: function(json,text) {
						 if(null != json.recorders && json.recorders.length>0){
						 		$('tablename').set('html',json.recorders[0].tname);
								$('vcol').set('html',json.recorders[0].vcol);
								$('pcol').set('html',json.recorders[0].pcol);
								$('condition').set('html',json.recorders[0].condition);
								nodeinfo.tname = json.recorders[0].tname;
								nodeinfo.vcol=json.recorders[0].vcol;
								nodeinfo.pcol=json.recorders[0].pcol;
								nodeinfo.condition=json.recorders[0].condition;
							}else{
								MUI.notification('<font color=red>错误：</font>未取到动态权限分配信息, id = '+nodeinfo.id);
							}
					}
				}).get({"scid":"authdyna_1","authid":nodeinfo.id});
			} catch (ex) {
				MUI.notification('<font color=red>错误：</font>访问失败('+ex.message+')');
			}
		}
	}
 
  });

</script>